#ifndef __CANNON_LAYER_H__
#define __CANNON_LAYER_H__
#include "cocos2d.h"
class Weapon;
class CannonLayer : public cocos2d::CCLayer
{
public:
	CannonLayer();
	virtual ~CannonLayer();
	bool init();
	static CannonLayer* create();
	Weapon* getWeapon() const { return _weapon; }

	bool shootTo(cocos2d::CCPoint touchLocation);
	void aimAt(cocos2d::CCPoint target);
private:
	void switchCannon(cocos2d::CCObject* sender);
private:
	Weapon* _weapon;
	cocos2d::CCMenuItemSprite* _subItem;
	cocos2d::CCMenuItemSprite* _addItem;
};

#endif